import * as request from '@/utils/request';

export function getDicListByType(type) {
  return request.get(`/system/dict/data/type/${type}`);
}

export function getBigScreenConfigData(data) {
  return request.get('/system/bigScreenConfig/getConfig', data);
}

export function updateBigScreenConfigData(data) {
  return request.put('/system/bigScreenConfig/updateConfig', data);
}

export function getDepartmentCodeConfigData(data) {
  return request.get('/system/departCodeConfig/getConfig', data);
}

export function updateDepartmentCodeConfigData(data) {
  return request.put('/system/departCodeConfig/updateConfig', data);
}

export function getAssetCodeConfigData(data) {
  return request.get('/system/assetCodeConfig/getConfig', data);
}

export function updateAssetCodeConfigData(data) {
  return request.put('/system/assetCodeConfig/updateConfig', data);
}

export function getWorkOrderAuditConfigData(data) {
  return request.get('/system/orderReviewConfig/getConfig', data);
}

export function updateWorkOrderAuditConfigData(data) {
  return request.post('/system/orderReviewConfig/save', data);
}

export function getAttendanceConfigData(data) {
  return request.get('/system/serviceAttendanceConfig/getConfig', data);
}

export function updateAttendanceConfigData(data) {
  return request.put('/system/serviceAttendanceConfig/updateConfig', data);
}

// 查询系统工单故障分类耗时配置树形结构
export function getTimelinessConfigTreeData(data) {
  return request.get('/system/timelinessConfig/queryTreeList', data);
}

export function getTimelinessConfigData(data) {
  return request.get('/system/serviceAttendanceConfig/getConfig', data);
}

export function updateTimelinessConfigData(data) {
  return request.put('/system/timelinessConfig/updateTime', data);
}
